home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
dviware
/
dviapollo
/
check.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-01
|
363b
|
17 lines
#include <stdio.h>
/*This routine determines whether a given error code represents an error.
If it does, then we print an error message and bomb. If it doesn't, then
the code is the returned value of check.*/
int check (code)
int code;
{
if (code < 0) {
fprintf (stderr, "Unanticipated error:\n");
perror ("");
exit (1);
}
return (code);
}